from core.basehandler import BaseHandler
from core.room import Room
from core.action import Action


class CG3(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        #add inventory items

        # build list of actions
        self.add_action(Next)    
        
    # return description of room.
    def get_description(self):
        return " You were just approaching the last known position of the liferaft when suddenly your  hawk-like eyes catch something on the horizon. You vector the pilot in and a life raft slowly emerges from the building seas. You grab your snorkel, flippers and jump into the water; its hero time. "
        
    # return image of room
    def get_image(self):
        return 'cg3_pic.jpg'
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return CG3

class CG3Handler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return CG3
# define actions for this room

class Next(Action):
    def __init__(self):
        Action.__init__(self, "Next")    # do basic initialization for every action
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'sea9rescueattempt'
    
    def get_description(self):
        return "Next"
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"